/* ============================================
   Village Portal - Complete CSS
   All pages styling with responsive design
   ============================================ */

:root {
  --color-primary: #0052CC;
  --color-primary-dark: #003d99;
  --color-primary-light: #4F8CFF;
  --color-secondary: #22223b;
  --color-text: #22223b;
  --color-text-light: #4b5563;
  --color-placeholder: #999;
  --color-border: #ddd;
  --color-error: #d32f2f;
  --color-success: #10b981;
  --color-bg-light: #f8f8f8;
  --color-white: #ffffff;
  --color-accent: #e0e7ff;
  --font-main: Arial, 'Helvetica Neue', sans-serif;
  --radius: 4px;
  --transition: 150ms ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  margin-left: 250px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ============================================
   Header & Navigation
   ============================================ */

.portal-header {
  background: linear-gradient(135deg, #1a5490 0%, #0052CC 100%);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex-wrap: wrap;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-white);
  flex-shrink: 0;
  min-width: 0;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px;
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.portal-tagline {
  font-size: 0.8rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.portal-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100vh;
  background: linear-gradient(135deg, #1a5490 0%, #0052CC 100%);
  padding: 2rem 0;
  z-index: 101;
  overflow-y: auto;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 1rem 1.5rem;
  border-radius: 0;
  transition: all var(--transition);
  display: block;
  border-left: 4px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  border-left: 4px solid var(--color-white);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================
/* Header actions: align items horizontally, prevent overlap */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 10;
}

.owner-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: #FFD700;
  font-weight: 600;
  margin-right: 0.5rem;
  white-space: nowrap;
}

.language-switcher {
  margin-right: 0;
  margin-left: 0.25rem;
  position: relative;
  z-index: 11;
}


.mobile-nav {
  display: none;
  background: linear-gradient(135deg, #1a5490 0%, #0052CC 100%);
  padding: 1rem 0;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 99;
}

.mobile-nav.active {
  display: block;
}

.mobile-menu {
  list-style: none;
  padding: 1rem;
}

.mobile-link {
  display: block;
  color: var(--color-white);
  padding: 0.8rem 1rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Page Section Management
   ============================================ */

.page-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   PAGE 1: LANDING PAGE STYLES
   ============================================ */

/* Hero Section */
.hero-section {
  position: relative;
  height: 400px;
  background: linear-gradient(135deg, #1a5490 0%, #0052CC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  overflow: hidden;
  padding: 2rem 1rem;
}

@media (max-width: 768px) {
  .hero-section {
    height: auto;
    min-height: 250px;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(79, 140, 255, 0.2) 0%, transparent 50%);
  animation: bgFloat 8s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.hero-description {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--color-white);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: 4px;
  transition: all var(--transition);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Welcome Section */
.welcome-section {
  padding: 3rem 1rem;
  background: var(--color-bg-light);
}

.welcome-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.welcome-text {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.welcome-telugu {
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-top: 1rem;
}

/* Quick Access */
.quick-access {
  padding: 3rem 1rem;
  background: var(--color-white);
}

.quick-access-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-secondary);
}

.main-content {
  min-height: calc(100vh - 200px);
}

.features-section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--color-bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

.feature-desc {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.feature-link {
  color: var(--color-primary);
  font-weight: 600;
  display: inline-block;
  transition: color var(--transition);
}

.feature-link:hover {
  color: var(--color-primary-dark);
}

/* Updates Section */
.updates-section {
  padding: 3rem 1rem;
  background: var(--color-bg-light);
}

.updates-container {
  max-width: 1200px;
  margin: 0 auto;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.update-card {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
  transition: all var(--transition);
}

.update-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.update-date {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.update-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

.update-desc {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ============================================
   PAGE 2: LIST PAGE STYLES
   ============================================ */

.page-header,
.form-header,
.detail-header,
.settings-header {
  background: linear-gradient(135deg, #1a5490 0%, #0052CC 100%);
  color: var(--color-white);
  padding: 2rem 1rem;
}

.page-header,
.form-header,
.settings-header {
  text-align: center;
}

.page-title,
.form-title,
.settings-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-subtitle,
.form-subtitle,
.settings-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.list-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.list-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.list-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  gap: 1rem;
}

.list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
}

.item-image {
  width: 150px;
  height: 150px;
  overflow: hidden;
  flex-shrink: 0;
}

.item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-content {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.item-date,
.item-location {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.item-preview {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin: 1rem 0;
  line-height: 1.5;
}

.item-footer {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.item-tag,
.item-status {
  display: inline-block;
  color: var(--color-white);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.item-tag {
  background: var(--color-primary-light);
}

.item-status {
  background: var(--color-success);
}

/* ============================================
   PAGE 3: DETAIL VIEW STYLES
   ============================================ */

.back-btn {
  color: var(--color-white);
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
  transition: all var(--transition);
}

.back-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.detail-title {
  font-size: 2rem;
  margin: 0;
}

.detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.detail-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 1rem;
  min-height: 400px;
}

.detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.detail-content {
  display: flex;
  flex-direction: column;
}

.detail-name {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.detail-info {
  background: var(--color-bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.info-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  font-weight: 600;
  color: var(--color-secondary);
  min-width: 120px;
}

.info-value {
  color: var(--color-text-light);
}

.detail-description {
  margin-bottom: 2rem;
}

.desc-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--color-secondary);
}

.desc-text {
  color: var(--color-text-light);
  line-height: 1.8;
}

.detail-agenda {
  margin-bottom: 2rem;
}

.agenda-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--color-secondary);
}

.agenda-list {
  list-style: none;
  padding-left: 1rem;
}

.agenda-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text-light);
}

.agenda-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: bold;
}

.detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

/* ============================================
   PROGRESS BAR STYLES
   ============================================ */

.progress-section {
  background: var(--color-bg-light);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.progress-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.progress-bar-container {
  margin-bottom: 1.5rem;
}

.progress-bar {
  width: 100%;
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success) 0%, #10b981 100%);
  border-radius: 12px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 600;
}

.progress-percentage {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-weight: 500;
}

.progress-stages {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.stage-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e0e0;
  border: 2px solid #999;
  transition: all 0.3s ease;
  position: relative;
}

.stage-dot.completed {
  background: var(--color-success);
  border-color: var(--color-success);
}

.stage-dot.completed::after {
  content: "✓";
  position: absolute;
  color: var(--color-white);
  font-weight: bold;
  font-size: 0.8rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.stage span {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-align: center;
  max-width: 80px;
}

.stage-dot.completed ~ span {
  color: var(--color-primary);
  font-weight: 600;
}

/* ============================================
   STATUS UPDATES TIMELINE
   ============================================ */

.status-updates {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.updates-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.update-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50px;
  width: 2px;
  height: 30px;
  background: var(--color-border);
}

.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-content {
  flex: 1;
  padding-top: 0.3rem;
}

.update-time {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0;
}

.update-msg {
  font-size: 0.95rem;
  color: var(--color-text);
  margin: 0.3rem 0 0 0;
}

.detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.action-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.register-btn {
  background: var(--color-primary);
  color: var(--color-white);
}

.register-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.share-btn {
  background: var(--color-bg-light);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.share-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ============================================
   PAGE 4: FORM PAGE STYLES
   ============================================ */

.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.registration-form {
  background: var(--color-white);
}

.form-instruction {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 500;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.required {
  color: var(--color-error);
  margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
  background: var(--color-white);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
  background-color: rgba(0, 82, 204, 0.02);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.form-group.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-group.checkbox label {
  margin-bottom: 0;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.submit-btn,
.reset-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.submit-btn {
  background: var(--color-primary);
  color: var(--color-white);
}

.submit-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.reset-btn {
  background: var(--color-bg-light);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.reset-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  display: block;
}

/* ============================================
   PAGE 5: SETTINGS PAGE STYLES
   ============================================ */

.settings-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
}

.settings-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-btn {
  padding: 0.8rem 1rem;
  background: var(--color-bg-light);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition);
  text-align: left;
}

.settings-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.settings-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.settings-panel {
  display: none;
  background: var(--color-bg-light);
  padding: 2rem;
  border-radius: 8px;
}

.settings-panel.active {
  display: block;
}

.panel-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary);
}

/* Profile Section */
.profile-section {
  background: var(--color-white);
  padding: 2rem;
  border-radius: 8px;
}

.profile-picture {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--color-accent);
  padding: 10px;
  margin-bottom: 1rem;
}

.change-photo-btn {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition);
}

.change-photo-btn:hover {
  background: var(--color-primary-dark);
}

.profile-form {
  display: flex;
  flex-direction: column;
}

.profile-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Settings Sections (Preferences, Notifications, Privacy) */
.preferences-section,
.notifications-section,
.privacy-section {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: 8px;
}

.pref-item,
.notification-item,
.privacy-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.pref-item:last-child,
.notification-item:last-child,
.privacy-item:last-child {
  border-bottom: none;
}

.pref-text h3,
.notification-text h3,
.privacy-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--color-secondary);
}

.pref-text p,
.notification-text p,
.privacy-text p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin: 0;
}

.pref-select {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--color-white);
  cursor: pointer;
  min-width: 150px;
}

.pref-select:focus {
  border-color: var(--color-primary);
  outline: none;
}

.toggle-switch {
  width: 50px;
  height: 28px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.danger-zone {
  background: #fff5f5;
  border: 2px solid var(--color-error);
  padding: 1.5rem;
  border-radius: 4px;
  margin-top: 2rem;
}

.danger-zone h3 {
  color: var(--color-error);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.danger-zone p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.delete-btn {
  padding: 0.6rem 1.2rem;
  background: var(--color-error);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
}

.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.save-btn {
  padding: 0.8rem 2rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.save-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* ============================================
   Footer
   ============================================ */

.portal-footer {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 3rem 1rem 1rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.footer-title {
  font-size: 1.3rem;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--color-primary-light);
  margin: 0.3rem 0;
}

.footer-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-section p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.3rem 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
  .nav-menu {
    gap: 0;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-container {
    grid-template-columns: 1fr;
  }

  .progress-stages {
    gap: 0.5rem;
  }

  .stage span {
    font-size: 0.75rem;
  }

  .settings-container {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .settings-btn {
    flex: 1;
    min-width: 150px;
  }
}

@media (max-width: 768px) {
  .header-container {
    gap: 1rem;
  }

  .logo-text h1 {
    font-size: 1.2rem;
  }

  body {
    margin-left: 200px;
  }

  .portal-nav {
    width: 200px;
  }

  .nav-link {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .list-item {
    flex-direction: column;
  }

  .item-image {
    width: 100%;
    height: 200px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    flex-direction: column;
  }

  .progress-stages {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .progress-section {
    padding: 1.5rem 1rem;
  }

  .pref-item,
  .notification-item,
  .privacy-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .pref-select {
    width: 100%;
  }
}

@media (max-width: 600px) {
  body {
    margin-left: 0;
  }

  .portal-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 99;
    padding-top: 80px;
  }
  
  .portal-nav.active {
    transform: translateX(0);
  }

  /* Notification responsive styles */
  .notification-dropdown {
    position: fixed;
    top: 70px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: calc(100vh - 100px);
  }

  .notification-btn {
    width: 36px;
    height: 36px;
  }

  .notification-icon {
    font-size: 1rem;
  }

  .notification-badge {
    min-width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }

  .hero-section {
    height: 300px;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .welcome-title {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .form-section-title {
    font-size: 1rem;
  }

  .page-header,
  .form-header,
  .settings-header,
  .detail-header {
    padding: 1.5rem 1rem;
  }

  .page-title,
  .form-title,
  .settings-title,
  .detail-title {
    font-size: 1.3rem;
  }

  .list-container,
  .form-container,
  .detail-header {
    padding: 1rem;
  }

  .detail-image {
    min-height: 250px;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .progress-section {
    padding: 1rem;
  }

  .progress-bar {
    height: 20px;
  }

  .stage-dot {
    width: 24px;
    height: 24px;
  }

  .timeline-item {
    gap: 0.8rem;
  }

  .timeline-dot {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 400px) {
  .header-logo {
    gap: 0.5rem;
  }

  .logo-text h1 {
    font-size: 1rem;
  }

  .portal-tagline {
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: 1.1rem;
  }

  .page-title,
  .form-title,
  .settings-title {
    font-size: 1.1rem;
  }

  .welcome-title,
  .section-title {
    font-size: 1.1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .submit-btn,
  .reset-btn {
    width: 100%;
  }

  .feature-card {
    padding: 1rem;
  }

  .feature-icon {
    font-size: 2rem;
  }
}

/* Toast notification styles moved to global.css for consistency across all pages */

/* ============================================
   Mobile Navigation Open State
   ============================================ */

@media (max-width: 768px) {
  .portal-nav.active {
    transform: translateX(0);
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}
